import axios from 'axios';

// 删除指定id的评论
let remove = (data) => axios.post('/comment/remove', data);

// 发表新的评论
let release = (data) => axios.post('/comment/release', data);

// 回复评论
let reply = (data) => axios.post('/comment/reply', data);

// 编辑指定id评论
let edit = (data) => axios.post('/comment/edit', data);

// 获取一篇文章下面的评论列表
let list = (params) => axios.get('/comment/list', { params });

// 获取指定id的评论详情
let detail = (params) => axios.get('/comment/detail', { params });

//  获取最新的评论列表
let recent = (params) => axios.get('/comment/recent', { params });

// 隐藏/显示评论
let visible = (data) => axios.post('/comment/visible', data);

// 让函数能在别的页面用，要export
export default {
	remove,
	release,
	reply,
	edit,
	list,
	detail,
	recent,
	visible,
}
